package com.barunsw.bwf.ems.common.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.barunsw.bwf.ems.dto.SampleVo;

/**
 * Handles requests for the application home page.
 */
@Controller
public class HomeController extends CommonController{
	
	private static final Logger logger = LoggerFactory.getLogger(HomeController.class);
	
	
	/**
	 * 메인 페이지 이동
	 * @param model
	 * @return
	 */
	@RequestMapping(value = "", method = RequestMethod.GET)
	public String home(Model model) {
		return "redirect:/index";
	}
	
	
	/**
	 * 메인 페이지
	 * @param model
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/index", method = RequestMethod.GET)
	public String index(Model model, SampleVo sampleVo) throws Exception {
		return "index";
	}

	
    /**
     * 로그인 페이지
     * 
     * @return
     */
    @RequestMapping(value = "/loginPage", method = RequestMethod.GET)
    public String loginPage() {
        return "loginPage";
    }
    
    
    /**
     * EventBus
     * 
     * @return
     */
    @RequestMapping(value = "/EventBus", method = RequestMethod.GET)
    public String eventBus() {
        return "EventBus";
    }
}
